<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="decorator" uri="/WEB-INF/tld/sitemesh-decorator.tld"%>
<%
	String port=":"+request.getServerPort();
	String serverPath =  request.getScheme()+"://"+request.getServerName()+(port.equals(":80")?"":port)+"/";
	String basePath = serverPath + request.getContextPath().replace("/","") + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>XX系统后台管理</title>
	<style type="text/css">
	body{font-family:'宋体';font-size:12px;}
	</style>
	<link rel="stylesheet" type="text/css" href="back/extJs/resources/css/ext-all.css">
	<link rel="stylesheet" type="text/css" href="back/extJs/site.css">
	<link rel="stylesheet" type="text/css" href="back/extJs/resources/css/ux-all.css">
	<link rel="stylesheet" type="text/css" href="back/extJs/resources/css/xtheme-<%=session.getAttribute("theme")==null?"default":session.getAttribute("theme") %>.css">
	<script type="text/javascript" src="back/extJs/adapter/ext/ext-base-debug.js"></script>
	<script type="text/javascript" src="back/extJs/ext-all-debug.js"></script>
	<script type="text/javascript" src="back/extJs/ext-lang-zh_CN.js"></script>
	<script type="text/javascript" src="back/extJs/ux-all-debug.js"></script>
	<script type="text/javascript" src="back/extJs/jquery-1.4.2-debug.js"></script>
	<script type="text/javascript" src="back/extJs/boatselect.js"></script>
	<script type="text/javascript" src="back/extJs/log.js"></script>
	<script type="text/javascript" src="back/extJs/ext-patch.js"></script>
	<script type="text/javascript" src="back/extJs/utils.js"></script>
	
	<script type="text/javascript">
				
Ext.Ajax.timeout = "90000";
Ext.BLANK_IMAGE_URL = "./back/extJs/resources/images/default/s.gif";
var basePath = '<%=basePath%>';

Ext.Ajax.on('requestexception', function(){
	Ext.Msg.alert('异常','系统错误,服务出现异常');
});
function jsImport($fp) {
 var hdTag=document.getElementsByTagName('head')[0]||document.documentElement;
 var script=document.createElement('script');
 script.type='text/javascript';
 script.charset="utf-8";
 script.src=$fp;
 hdTag.insertBefore( script, hdTag.firstChild );//hdTag.appendChild(script);IE6中断
}
var NATIVE_LANG="ZH-CN";

	function changerTheme(theme) {
		Ext.util.CSS.swapStyleSheet("theme", "./back/extJs/resources/css/xtheme-"
				+ theme + ".css");
		var frames = document.getElementsByTagName('iframe');
		var length = frames.length;
		for ( var i = 0; i < length; i++) {
			var iwin=frames[i].contentWindow;
			iwin.changerTheme(theme);
		}
	}
</script>
		<title><decorator:title />
		</title>
		<decorator:head />
	</head>
	<!-- 页面JS -->
  <body style="overflow-x:hidden;overflow-y:hidden;">
		<div id="loading">
		 <div>
		 <img src="./back/extJs/images/loading.gif">
		 <span style="margin-left: 8px; color: #225588;">***信息系统</span>
		 <br/>
		 <span style="margin-left: 8px; color: #225588;" id="loading-msg">正在加载网页内容.....</span>
		 </div>
		</div>
		<decorator:body />
		<script type="text/javascript">
		Ext.onReady(function (){
			if(Ext.get("loading")!=null) Ext.get("loading").dom.style.display = 'none';
			
			Ext.Ajax.on('beforerequest', function(){  
			  Ext.Ajax.extraParams={'ajax_extraParams':'true'};  
			}, this);
			Ext.Ajax.on('requestcomplete', function(conn,response){  
			  var tmp = response.responseText;
			    if( tmp != null && tmp != ''&& tmp.indexOf("ajax_session_invalid") != -1){
			    	if(Ext.decode(tmp).ajax_session_invalid){  
			    		Ext.Msg.alert("系统提示","您未操作系统时间过长,请重新登陆!",function(){
			    			window.top.location="back/jsp/backlogin.jsp";
			        });
			    	}
			    }
			},this);
		});
		</script>
	</body>
</html>
